﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACH
{
    public partial class LodgingRooms : Form
    {
        public LodgingRooms()
        {
            InitializeComponent();
        }

        private void toolStripSave_Click(object sender, EventArgs e)
        {
            this.Validate();
            bindingSource1.EndEdit();
            lodgingRoomsTableAdapter.Update(aCHDataSet.LodgingRooms);
        }

        private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
        {
            lodgingRoomsTableAdapter.Update(aCHDataSet.LodgingRooms);
        }

        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            Helper.CreateNew(bindingSource1);
        }

        private void LodgingRooms_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'aCHDataSet.Lodgings' table. You can move, or remove it, as needed.
            this.lodgingsTableAdapter.Fill(this.aCHDataSet.Lodgings);
            // TODO: This line of code loads data into the 'aCHDataSet.RoomTypes' table. You can move, or remove it, as needed.
            this.roomTypesTableAdapter.Fill(this.aCHDataSet.RoomTypes);
            // TODO: This line of code loads data into the 'aCHDataSet.LodgingRooms' table. You can move, or remove it, as needed.
            this.lodgingRoomsTableAdapter.Fill(this.aCHDataSet.LodgingRooms);

        }
    }
}
